/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package util;

/**
 *
 * @author BoonJ
 */
public class KwartaalHelper {

    public static String getLastMonth(String kwartaal) {
        int quarter = Integer.parseInt(kwartaal);
        switch (quarter) {
            case 1:
                return "03";

            case 2:
                return "06";

            case 3:
                return "09";

            case 4:
                return "12";

            default:
                return "-1";
        }
    }

    public static String getLastDate(String jaar,String kwartaal) {
        int quarter = Integer.parseInt(kwartaal);
        switch (quarter) {
            case 1:
                return jaar + "/03/31";

            case 2:
                return jaar + "/06/30";

            case 3:
                return jaar + "/09/30";

            case 4:
                return jaar + "/12/31";

            default:
                return "-1";
        }
    }
    
        public static String getFirstDate(String jaar,String kwartaal) {
        int quarter = Integer.parseInt(kwartaal);
        switch (quarter) {
            case 1:
                return jaar + "/01/01";

            case 2:
                return jaar + "/04/01";

            case 3:
                return jaar + "/07/01";

            case 4:
                return jaar + "/10/01";

            default:
                return "-1";
        }
    }
}